<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>余额提现</title>
    <meta  content="app-id=518966501"  name="apple-itunes-app">
    <meta  name="viewport"  content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0">
    <meta  content="yes"  name="apple-mobile-web-app-capable">
    <meta  content="black"  name="apple-mobile-web-app-status-bar-style">
    <meta  content="telephone=no"  name="format-detection">
    <link  href="../addons/feng_auction/template/css/comm.css"  rel="stylesheet"  type="text/css">
    <link  href="../addons/feng_auction/template/css/member.css?v=201504051726"  rel="stylesheet"  type="text/css">
    <script   src="../addons/feng_auction/template/js/jquery190.js" type="text/javascript"></script>
</head>
<body  style="zoom: 1;">
<div  id="loadingPicBlock">
    <input  name="loadDataType"  type="hidden"  id="loadDataType"  value="0">
    <div  class="wrapper">
        <div  id="div_account"  class="clearfix m_account_details">
            <ul  class="m-userMoneyNav">
                <li><a  id="btnConsumption"  href="javascript:xiaofei();"  class="z-MoneyNav-crt01"><b>余额提现</b>账户余额：￥{$members['balance']}.00</a><s></s></li>
                <li><a  id="btnRecharge"  href="javascript:chongzhi();"  class=""><b>提现记录</b>提现金额：￥{$allprice}.00</a></li>
            </ul>
            <ul  id="ulConsumption" class="g-Total gray9" style="display: block;"><li  class="m-userMoneylst-tt"><span>提现非即时到账，到账时间为1—2天！</span></li>
            <form id="form1" action="javascript:;" method="post">
            <section  class="clearfix g-member">
                <div  class="g-Recharge">
                    <ul  id="ulOption">
                        <!--<li  money="200"><a  href="javascript:;"  class="">提现<s></s></a></li>-->
                        
                        <li style="margin-left:auto;margin-right:auto;"><b  class="z-initsel" ><input  type="text" id="experience" class="z-init"  placeholder="输入金额"  maxlength="7" ><s></s></b></li>
                        <!--<li  money="200" style="background-color: rgb(247,247,247);">元</li>-->
                        
                    </ul>
                </div>
                <article  class="clearfix mt10 g-pay-ment g-bank-ct">
                    <ul  id="ulBankList">
                        <li  class="gray6">注：提现申请后，请耐心等待工作人员的处理。<em  class="orange"></em></li>
                        <li  class="gray9 checked" id="txbank"><s></s>提现到银行卡</li>
                        <li  class="gray9" id="txalipay"><s></s>提现到支付宝</li>
                        <input type="hidden" id="paytype" value="1"/>
                    </ul>
                </article>
                <div  class="mt10 f-Recharge-btn">
                    <a  id="btnSubmit"  href="javascript:submit();"  class="z-Btn">提交申请</a>
                </div>
            </section>
            </form>
            </ul>
            <ul  id="ulRechage"  class="m-userMoneylst"  style="display: none;"><li  class="m-userMoneylst-tt"><span>提现时间</span><span>金额</span><span>方式</span><span>状态</span></li>
            {loop $withd_record $id $recharges}
            <li  class=""><span>{php echo date('Y-m-d',$recharges['createtime'])}</span><span>￥{$recharges['price']}.00</span><span>{if ($recharges['paytype']==1)}银行卡{else}支付宝{/if}</span><span>{if ($recharges['status']==0)}提现中{else}已完成{/if}</span></li>
            {/loop}
            {if empty($withd_record)}
            <div class="noRecords gray9"><s></s>暂无记录</div>
            {/if}
            </ul>
            <div  id="divLoad"  class="loading"  style="display: none;"><b></b>正在加载</div>
        </div>
        <div  class="load_more"  id="btnLoadMore"  style="display: none;"><a  href="javascript:;"  title="加载更多">加载更多</a></div>
        <div class="footer" style="bottom: 0px;">
            <ul>
                <li class="f_home"><a href="{php echo $this->createMobileUrl('index')}" title="首页"><i></i>首页</a></li>
                <li class="f_whole"><a href="{php echo $this->createMobileUrl('introduction')}" title="拍卖介绍"><i></i>拍卖介绍</a></li>
                <li class="f_personal"><a href="{php echo $this->createMobileUrl('profile')}" class="hover" title="个人中心"><i></i>个人中心</a></li>
            </ul>
        </div>
    </div>
</div>
</body>
<script>
var xiaofeim = document.getElementById('btnConsumption');
var chongzhim = document.getElementById('btnRecharge');
var xiaofeix = document.getElementById('ulConsumption');
var chongzhix = document.getElementById('ulRechage');
function xiaofei(){
    xiaofeim.className = 'z-MoneyNav-crt01';
    chongzhim.className = '';
    xiaofeix.style.display = 'block';
    chongzhix.style.display = 'none';
}
function chongzhi(){
    xiaofeim.className = '';
    chongzhim.className = 'z-MoneyNav-crt02';
    xiaofeix.style.display = 'none';
    chongzhix.style.display = 'block';
}

$("li#txbank").click(
    function(){
        $("li#txalipay").removeClass('checked');
        $("li#txbank").addClass('checked');
        $("#paytype").val("1");
    }
    );
$("li#txalipay").click(
    function(){
        $("li#txbank").removeClass('checked');
        $("li#txalipay").addClass('checked');
        $("#paytype").val("2");
    }
    );
function submit(){     
    var form_input = document.getElementById("form1");
    var experience = form_input['experience'].value;
    var paytype = form_input['paytype'].value;
    if (!experience) {
        alert('请输入您的提现金额！');
        return false;
    }
    if (experience > {$members['balance']}) {
        alert('提现金额大于您的余额！');
        return false;
    }
    
    var message=confirm('请确认您的申请');
    if (message) {
        $.post('{php echo $this->createMobileUrl('ajaxwith',array('uid'=>$members['id'],'balance'=>$members['balance']))}',{experience:experience,paytype:paytype},function(m){
        alert(m);
        window.location.href="{php echo $this->createMobileUrl('profile')}";
        },"html");
    };
}
</script>
</html>